<template>
	<view class="kill_reward">
		<view class="close" @click="$emit('close')">
			<image :src="`${baseImageUrl}/common/close1.png`"></image>
		</view>
		<view class="title">
			<view>江湖追讨</view>
		</view>
		<image :src="url" class="cover"></image>
		<view class="number">{{profit}}</view>
		<view class="tips" v-if="profit>0">恭喜您，成功躲过追杀!</view>
		<view class="tips" v-else>很遗憾，未能躲过追杀!</view>
		<view class="btn" @click="$emit('close')">确定</view>
	</view>
</template>

<script>
	export default {
		props: {
			url: {
				type: String,
				default: ''
			},
			profit: {
				type: [Number, String],
				default: 0
			}
		},
	}
</script>

<style scoped lang="scss">
	.kill_reward {
		width: 688rpx;
		height: 700rpx;
		padding: 100rpx 60rpx;
		box-sizing: border-box;
		background: url(#{$baseImageUrl}/bg/688_700.png) no-repeat;
		background-size: 100% 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		align-items: center;
		position: relative;

		.close {
			width: 122rpx;
			height: 122rpx;
			position: absolute;
			right: 0rpx;
			top: 42rpx;
			transform: translate(50rpx, -50rpx);
			z-index: 2;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.title {
			display: flex;
			justify-content: center;
			align-items: center;

			view {
				width: 256rpx;
				height: 30rpx;
				line-height: 30rpx;
				text-align: center;
				color: #494338;
				font-size: 42rpx;
				font-weight: 400;
				font-family: LiSu;
				background: url(#{$baseImageUrl}/home/title.png) no-repeat;
				background-size: 100% 100%;
			}
		}

		.cover {
			width: 86rpx;
			height: 86rpx;
		}

		.number {
			color: #494338;
			font-size: 50rpx;
			font-weight: 400;
			font-family: SimSun;
		}

		.tips {
			color: #494338;
			font-size: 32rpx;
			font-weight: 400;
			font-family: SimSun;
			display: flex;
			justify-content: center;
		}

		.btn {
			width: 204rpx;
			height: 74rpx;
			line-height: 74rpx;
			text-align: center;
			color: #FFFFFF;
			font-size: 30rpx;
			font-weight: 400;
			font-family: SimSun;
			background: url(#{$baseImageUrl}/common/btn.png) no-repeat;
			background-size: 100% 100%;
		}
	}
</style>